<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="<?php echo admin_css;?>common.css" type="text/css"/>
    <link rel="stylesheet" href="<?php echo admin_css;?>/admin.css" type="text/css"/>
    <link rel="stylesheet" href="<?php echo admin_css;?>/base.css" type="text/css"/>
    <script type="text/javascript" src="<?php echo admin_js;?>jquery-2.1.0.js"></script>
    <script type="text/javascript" src="<?php echo admin_js;?>/bundle.min.js"></script>
    <style type="text/css">
        .content {
            width: 721px;
            height: 711px;
            margin: 0 auto;
        }

        .stitle {
            overflow: hidden;
            width: 623px;

            border-bottom: 1px solid #e9ecf3;

        }

        .neirong {
            margin-top: 20px;
            width: 722px;
            height: 635px;
            border: 2px solid red;
            border-bottom: 2px solid #ccc;
        }

        .stitle ul li {
            display: block;
            float: left;
            width: 100px;
            height: 50px;
            text-align: center;
            line-height: 50px;
            font-weight: bold;
        }

        .act_content {
            width: 721px;
            height: 301px;
            margin-bottom: 20px;

            border: 1px solid red;

        }

        .act_content_inp {
            width: 300px;
            height: 120px;
            float: right;
            border: 1px solid blue;
        }

        .act_content_left {

            position: relative;
            float: left;
            width: 631px;
            height: 294px;
        }

        .act_content_right {
            position: relative;
            float: right;
            width: 88px;
            height: 294px;

        }

        .inp_log {
            margin-top: 10px;
            margin-left: 0px;
            margin-bottom: 10px;
            width: 290px;
            height: 40px;
        }

        .between_button {
            width: 274px;
            border: 2px solid red;
            height: 120px;
        }

        .textare {
            clear: both;
            margin-top: 20px;
            width: 595px;
            height: 122px;

        }

        .edit {
            height: 188px;
            width: 636px;
            border: 2px solid red;
            margin-bottom: 20px;

        }

        .edit_left {
            width: 180px;
            height: 186px;
            border: 3px solid red;
            float: left;
            position: relative;
        }

        .edit_right {
            width: 400px;
            height: 186px;
            float: left;

            position: relative;
        }

        .edit_right input, select {
            display: inline;
            float: left;
        }

        .edit_left_cont {
            width: 145px;
            height: 145px;
            background: #fff;
        }

        .edit_log {
            width: 190px;
            height: 33px;
            float: left;
        }

        .edit_textare {
            width: 400px;
            height: 120px;
        }

        .textare {
            margin-top: 10px;
        }

        .between_button_inner {
            width: 275px;
            height: 120px;
            position: relative;
        }

    </style>
</head>
<body>
<div class="main">
    <div class="content">
        <div class="stitle">
            <ul>
                <li class="open">活动编辑</li>
                <li class="close">商品编辑</li>
            </ul>
        </div>
        <div class="neirong">
            <form name="main_form" method="POST" action="<?php echo U('edit'); ?>" enctype="multipart/form-data">
                <?php foreach ($data as $k => $v): ?>
                <div class="act_content">
                    <div class="act_content_left grey">
                        <div class="veti">
                            <div class="between_button">
                                <div class="between_button_inner veti " style=" position:relative;background: #fff">
                                    <p style="position: absolute"
                                       style="width: 100px;height: 100px;"></p>
                                    <a href="javascript:;" class="a-upload">
                                        <input type="file"  name="license_img">上传图片
                                    </a><!--<button>上传图片</button>-->
                                </div>
                            </div>
                                <div class="act_content_inp">
                                    <input class="inp_log" name="theme[]" value="<?php echo $v['theme']; ?>"
                                           placeholder="促销标题(不得超过20个字)">
                                    <input class="inp_log" name="gene_time[]" value="<?php echo $v['gene_time']; ?>"
                                           placeholder="活动时间">
                                    <input type="hidden" name="user_id[]" value="1"/>
                                    <input type="hidden" name="user_type[]" value="1"/>
                                    <input type="hidden" name="shop_id[]" value="1"/>
                                    <input type="hidden" name="act_id[]" value="1"/>
                                </div>
                                <textarea class="textare" name="text[]" value="text"
                                      placeholder="促销信息，参与方式(不超过180字)">
                                </textarea>
                        </div>
                    </div>
                    <div class="act_content_right">
                        <a class="veti bt_cw" style="border:1px solid #CCC;"
                           href="<?php echo U('delete?act_id='.$v['act_id'].'&p='.I('get.p')); ?>"
                           onclick="return confirm('确定要删除吗？');" title="移除">删除</a>
                    </div>
                </div>
                <?php endforeach; ?>
                <button class="veti bt_cw" style="" type="submit"> 保存</button>
            </form>
        </div>

        <div class="neirong" style="display: none">
            <div class="edit grey">
                <div class="edit_left ">
                    <div class="edit_left_cont veti ">
                        <div class="" style="">
                            <button class="veti">上传图片</button>
                        </div>
                    </div>
                </div>
                <div class="edit_right">
                    <div class="apeak">
                        <input class="inp_w190 " placeholder="商品名称">
                        <select class="sel_w190 ml10 " placeholder="可预定">
                            <textarea class="textare edit_textare" placeholder="商品信息，信息">
                           </textarea>
                    </div>
                </div>
            </div>
            <div class="edit grey">
                <div class="edit_left ">
                    <div class="edit_left_cont veti ">
                        <div class="" style="">
                            <button class="veti">上传图片</button>
                        </div>
                    </div>
                </div>
                <div class="edit_right">
                    <div class="apeak">
                        <input class="inp_w190 " placeholder="商品名称">
                        <select class="sel_w190 ml10 " placeholder="可预定">
                            <textarea class="textare edit_textare" placeholder="商品信息，信息">
                           </textarea>
                    </div>
                </div>
            </div>
            <div class="edit grey">
                <div class="edit_left ">
                    <div class="edit_left_cont veti ">
                        <div class="" style="">
                            <button class="veti">上传图片</button>
                        </div>
                    </div>
                </div>
                <div class="edit_right">
                    <div class="apeak">
                        <input class="inp_w190 " placeholder="商品名称">
                        <select class="sel_w190 ml10 " placeholder="可预定">
                            <textarea class="textare edit_textare" placeholder="商品信息，信息">
                           </textarea>
                    </div>
                </div>
            </div>
        </div>
      <!--</div>-->

    <?php if(preg_match('/\d/', $page)): ?>

    <?php echo $page; ?>
    <?php endif; ?>
</div>

</body>
</html>
<script>
    $(function () {
        $(".stitle li").click(function () {
            $(this).css({"border-bottom": "5px solid #6FD7D6", "font-weight": "blod", "color": "black"});
            $(this).siblings().css({"border-bottom": "", "color": "#999999"});
            var index_tab = $(this).parent().children().index($(this)); //选项卡的索引值
            $(this).parent().find(".open").removeClass("open").addClass("close"); //选项卡背景处理
            $(this).removeClass("close").addClass("open");
            var content_obj = $(".neirong"); //内容节点
            content_obj.hide();
            content_obj.eq(index_tab).show();
        });
    });
    /*暂时先穷举*/
    var uploadFiles1 = new UploadFiles('fileList1', 'fileElem1', function () {
        // alert('上传完毕');
    });
    uploadFiles1.init();
</script>